﻿using Pay.Model;
using Pay.Model.Dto;
using Pay.Model.Interfaces;
using Pay.Model.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.Dal
{
    public interface IAliAccountDal
    {
        /// <summary>
        /// 根据金额和支付宝id后去二维码
        /// </summary>
        /// <param name="amount"></param>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<List<QRCodeInfo>> GetByAmount(decimal amount, long[] ids);


        Task<List<AliAccountInfo>> GetAccountByUserId(long userId);
        

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>

        Task<bool> Update(AliAccountInfo model);

        /// <summary>
        /// 根据商户code获取key
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        Task<MerchantInfo> GetKeyByCode(string code);
        /// <summary>
        /// 根据系统账号查询支付宝信息
        /// </summary>
        /// <param name="systemName"></param>
        /// <returns></returns>
        Task<AliAccountInfo> GetInfoBySystemName(string systemName);
        /// <summary>
        /// 是否包含系统账号，保证唯一
        /// </summary>
        /// <param name="systmeName"></param>
        /// <returns></returns>
        Task<bool> IsContainSystemAccount(string systmeName);
        Task<AliAccountInfo> GetAccountById(long Id);

        Task<long> Add(AliAccountInfo model);

        Task<bool> Forbidden(AliAccountInfo model);

        Task<bool> Delete(AliAccountInfo model);


        Task<IPagedOutput<AliAccountInfo>> GetPage(string searchWord, long userId, DateTime? timeBegin = null, DateTime? timeEnd = null, int offset = 10, int rows = 1);


        Task<long> Add(QRCodeInfo model);

    } 
}
